import ajax from 'uni-ajax'

const service = ajax.create({
    baseURL:'https://mymusic-five.vercel.app/'
})

service.interceptors.request.use(
    config => {
        return config
    },
    error => {
        return Promise.reject(error)
    }
)

service.interceptors.response.use(
    response => {
        if (response.statusCode === 200) {
            return response.data
        }else{
            console.log('net work wrror');
        }
    },
    error => {
        return Promise.reject(error)
    }
)
export default service;